package com.foodplus.www.foodplus;

import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.RadioGroup;

import com.foodplus.www.utils.FragmentTabUtils;
import com.foodplus.www.view.fragments.BasketFragment;
import com.foodplus.www.view.fragments.SpecialFragment;
import com.foodplus.www.view.fragments.HomeFragment;
import com.foodplus.www.view.fragments.MyFragment;
import com.foodplus.www.view.fragments.ShopFragment;
import com.github.jdsjlzx.recyclerview.LRecyclerView;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class MainActivity extends AppCompatActivity {
    @BindView(R.id.rgs)
    RadioGroup rgs;

    private List<Fragment> fragments = new ArrayList<>();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
        fragments.add(HomeFragment.newInstance());
        fragments.add(SpecialFragment.newInstance());
        fragments.add(ShopFragment.newInstance());
        fragments.add(BasketFragment.newInstance());
        fragments.add(MyFragment.newInstance());

        FragmentTabUtils utils = new FragmentTabUtils(getSupportFragmentManager(),fragments,R.id.fragment_container,rgs);
    }
}
